package com.bifang.common.constant.enums.common;

public enum LoginTypeEnum {
    username("username", "账号密码"),
    cellphone("cellphone", "手机验证码"),
    idcard("idcard", "证件号码密码登录"),
    email("email", "邮箱验证码"),
    weixin("weixin", "微信小程序登录"),
    weixinH5("weixinH5", "微信公众号网页登录"),
    alipay("alipay", "支付宝"),
    dingding("dingding", "钉钉"),
    zzd("zzd", "浙政钉"),
    qq("qq", "qq登入"),
    srcm("srcm", "省人才码登录"),
    zlb("zlb", "浙里办"),
    zjzww("zjzww", "浙江政务网登录"),
    client("client", "应用单点登录"),
    dzsbk("dzsbk", "电子社保卡登录"),
    other("other", "其他登录"),
    userId("userId", "userId用户切换登录"),
    free("free", "免密登录");
    private String type;
    private String name;

    LoginTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public static LoginTypeEnum getByType(String type) {

        for (LoginTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }
}
